#ifndef __TULING_UPLOAD_IMPL_H__
#define __TULING_UPLOAD_IMPL_H__

#include "TulingUpload.h"
#include "Thread.h"
#include "TulingConfig.h"

class TulingUpload::TulingUploadImpl
{
public:
	TulingUploadImpl();
	~TulingUploadImpl();
	void SetEventListener(IOnEvent* _pEvent);
	void Init();
	void Start();
	void Stop();
	void on_start();
	void on_data(const void * pData,int nLen);
	void on_stop();
private:
	void RunUpload();
	void ParseUploadRsp(unsigned char* strUploadMsg,int nMsgLen);
private:
	TulingUpload::IOnEvent * pEvent;
	int nSockFd;
	rtos::Thread thUpload;
	TulingProfile * pProfile;
	bool bIsInit;
	
};

#endif
